#include "x64.h"

#include <ntddk.h>

NTSTATUS
DriverEntry(_In_ PDRIVER_OBJECT DriverObject, _In_ PUNICODE_STRING RegisterPath)
{
	VA Va1 = { .Value = 0x00000273800003BC }; PA Pa1;
	VA Va2 = { .Value = 0x000002737CC0002A }; PA Pa2;
	VA Va3 = { .Value = 0x000002737C5C0010 }; PA Pa3;

	NTSTATUS Status;
	PEPROCESS Process;
	Status = PsLookupProcessByProcessId((HANDLE)7160, &Process);
	if (!NT_SUCCESS(Status)) return Status;

	Status = VaToPa(Process, Va1, &Pa1);
	if (NT_SUCCESS(Status)) {
		DbgPrint("Va1 0x%016I64X => Pa1 0x%016I64X\n", Va1.Value, Pa1.Value);
	}

	Status = VaToPa(Process, Va2, &Pa2);
	if (NT_SUCCESS(Status)) {
		DbgPrint("Va2 0x%016I64X => Pa2 0x%016I64X\n", Va2.Value, Pa2.Value);
	}

	Status = VaToPa(Process, Va3, &Pa3);
	if (NT_SUCCESS(Status)) {
		DbgPrint("Va3 0x%016I64X => Pa3 0x%016I64X\n", Va3.Value, Pa3.Value);
	}

	ObDereferenceObject(Process);

	DbgBreakPoint();

	return STATUS_SUCCESS;
}
